﻿using System;
using System.IO;
using System.Windows.Forms;

namespace Protobuf_Gui.Domain
{
    [Serializable]
    public class PbEnumValue : ProtocolElement
    {
        public PbEnumValue(string name) : base(name)
        {
        }

        public string Value { get; set; }

        public PbEnumValue(string name, string value) : base(name)
        {
            Value = value;
        }

        public override TreeNode ToTreeNode(TreeNode root)
        {
            throw new NotImplementedException();
        }

        public override void ToFile(TextWriter writer, uint nesting)
        {
            string tabs = Tabs(nesting);
            writer.WriteLine("{0}{1} = {2};", tabs, Name, Value);
        }
    }
}